<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>结构伪类选择器</title>
    <style>
      /*
      第一个
       ul li:first-child{
          background: yellow;
      }
      最后一个
      ul li:last-child{
          background: red;
      } */

      /* 第几个 */
      /* li:nth-child(2),li:nth-child(4){
          background-color: blue;
      }
       */

       /* 第几个，偶数2n(even)  奇数2n+1 2n-1(odd) */
       li:nth-child(odd){
           background: yellow;
       }
    </style>
</head>
<body>
   <ul>
       <li>1111</li>
       <li>2222</li>
       <li>3333</li>
       <li>4444</li>
       <li>5555</li>
   </ul>
</body>
</html>
